package org.mtmi.ui.layouts;

import org.eclipse.swt.graphics.Point;
import org.mtmi.ui.controls.Control;

/**
 * Main contract for a layout.
 *
 */
public interface ILayout 
{
	/**
	 * Layout controls in the area given by LayoutData.
	 * @param d data available to layout (area, gc, ...)
	 * @param controls the controls to layout.
	 */
	public void layout( LayoutData d, Control controls[] );
	
	/**
	 * @return the preferred size for this layout.
	 * @param d available gc, layout area is unused
	 * @param controls controls to layout.
	 */
	public Point computeSize( LayoutData d, Control[] controls );
	
}
